<template>
	<view class=" p15">
		<view class="list">
			<view class="flexb">
				<view class="f15"><text class="bold">通知人：</text>{{desc.tzr_name}}</view>
				<view class="f12" style="color: #8E8E8E;">{{desc.createtime}}</view>
			</view>
			<view class="f13" style="margin: 20rpx 0 0 0;">
				<view style="line-height: 44rpx;"><text class="bold">主题：</text>{{desc.subject}}</view>
				<view style="line-height: 44rpx;margin: 8rpx 0;"><text class="bold">摘要：</text>{{desc.abs}}</view>
				<view style="line-height: 44rpx;"><text class="bold">内容：</text></view>
				<view style="width: 100%;">
					<rich-text :nodes="content"></rich-text>
				</view>
			</view>
		</view>
	</view>
</template>

<script>
	import helper from '../../common/helper.js';
	import api from '../../common/api.js';
	export default {
		data() {
			return {
				desc: [],
				id: 0,
				content:''
			}
		},
		onLoad(options) {
			this.id = options.id
			this.onl();
			console.log(222)
		},
		methods: {
			preview(src, e) {
				// do something
			},
			navigate(href, e) {
				// do something
			},
			async onl() {
				var id = this.id;
				var _this = this;
				await api.message_desc({
					id: id
				}).then(res => {
					_this.desc = res.data;
					console.log('desc',_this.desc)
					_this.content =res.data.content.replace(/<img /g, '<img style="display:block;width: 100%;" ');
					console.log('content',_this.content)
				});


			},
		}
	}
</script>

<style scoped>
	.list {
		background-color: #ffffff;
		margin-top: 10px;
		border-radius: 20rpx;
		padding: 30rpx 20rpx;
	}
</style>